{% extends 'base/base.html' %}
{% load static %}
{% block main %}

<div class="row justify-content-center">
  <div class="col-lg-8 col-xl-7">
    <div class="card p-4">
      <h1 class="h4 card-title mb-3">编辑文章</h1>
      <form method="post">
        {% csrf_token %}
          {{ form.media }}
        <div class="mb-3">
          <label class="form-label">{{ form.title.label }}</label>
          {{ form.title }}
        </div>
        <div class="mb-3">
          <label class="form-label">{{ form.content.label }}</label>
          {{ form.content }}
        </div>

          <div class="mb-3">
          <label class="form-label">{{ form.tags.label }}</label>
          {{ form.tags }}
        </div><div class="mb-3">
          <label class="form-label">{{ form.category.label }}</label>
          {{ form.category }}
        </div>

        <div class="d-flex gap-2">
          <button type="submit" class="btn btn-primary">提交</button>
          <a class="btn btn-outline-secondary" href="{% url 'main:index' %}">返回</a>
        </div>
      </form>
    </div>
  </div>
</div>
{% endblock %}